Skip to content

Add KioskModeManager component - #14736

Open
KlausLoeffelmann wants to merge 10 commits into
dotnet:mainfrom
KlausLoeffelmann:Net11Api_04_KioskManagerComponent
Open

Add KioskModeManager component#14736
KlausLoeffelmann wants to merge 10 commits into
dotnet:mainfrom
KlausLoeffelmann:Net11Api_04_KioskManagerComponent

Conversation

@KlausLoeffelmann

@KlausLoeffelmann KlausLoeffelmann commented Jul 14, 2026

Copy link
Copy Markdown
Member

Closes #14586.
Contributes to #14694.

Bug fixes

  • Introduces the designer-friendly KioskModeManager component.
  • Supports fullscreen restoration, optional taskbar coverage, topmost behavior, cursor auto-hide, and power-saving suppression.
  • Reports keyboard, mouse, power-resume, and session wakeup sources.
  • Resolves containing forms safely for both Form- and UserControl-hosted components.
  • Adds lifecycle, initialization, keyboard, wakeup, disposal, and data-binding coverage.
Microsoft Reviewers: Open in CodeFlow

KlausLoeffelmann and others added 10 commits July 28, 2026 20:00
* Refactor KioskModeManager component and introduce WakeUp-Events incl.. new WakeUpEventArgs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 20883488-cf1e-4ad3-a681-0724e9f16777
Size borderless fullscreen forms directly to the selected screen bounds instead of maximizing them. This keeps StatusStrip items and working-area-constrained dropdowns on the same screen edge while preserving restored form state.

Fixes dotnet#14765

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c352332b-4b81-4492-bcfc-9dec524c27c9
Choose fullscreen bounds from RestoreBounds for minimized and maximized forms so a minimized-window sentinel cannot redirect kiosk mode to the wrong monitor.

Fixes dotnet#14765

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c352332b-4b81-4492-bcfc-9dec524c27c9
Reapply explicit fullscreen bounds when display geometry or the taskbar working area changes so the normal-state kiosk window tracks the selected screen like the previous maximized window did.

Fixes dotnet#14765

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c352332b-4b81-4492-bcfc-9dec524c27c9
API review feedback: the "Wakeup" elements are more general than kiosk mode
and should not be part of KioskModeManager. They can reappear later with a
broader scope.

Removes the Wakeup event, OnWakeup, WakeUpCommand, KioskModeWakeupEventArgs,
KioskModeWakeupEventHandler, and KioskModeWakeupSource, along with the power
broadcast and terminal session notification plumbing that only fed them.
Display change tracking, which keeps the fullscreen bounds current, is kept.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8999e9ff-9bcc-4755-b337-7fc5496d431c
API review feedback: HideTaskbar was removed to simplify the window models.

Kiosk fullscreen now always sizes the borderless form to the complete bounds
of the screen that displays it, so there is a single window model and the
kiosk surface always covers the taskbar.

Because the fullscreen form now covers the taskbar, drop-downs owned by that
form can no longer be constrained to the screen working area - doing so
detaches them from the item that opened them (dotnet#14765).
ToolStripDropDown and ToolStripDropDownItem now constrain to the complete
screen bounds when the owning top-level window is borderless and covers the
screen.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8999e9ff-9bcc-4755-b337-7fc5496d431c
- ToggleFullScreenKey => ToggleFullScreenKeys, for consistency with the
  plurality of the Keys type. The property now matches the complete key
  combination, including modifiers, and Keys.None disables key based
  toggling.
- SuppressPowerSaving => AlwaysOn.

Also documents that the fullscreen keys are focus driven: they are evaluated
only for input dispatched to the managed form or one of its child controls,
and no global keyboard hook or system wide hot key is installed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8999e9ff-9bcc-4755-b337-7fc5496d431c
@KlausLoeffelmann
KlausLoeffelmann force-pushed the Net11Api_04_KioskManagerComponent branch from cb1b3a9 to 5113258 Compare July 29, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant